fix(list): stop repeating the failure count in the list footer#3467
Merged
Conversation
A failed task printed the same count on two adjacent lines: the summary footer's "N tasks failed" clause and the warning header immediately below it that details each failure. The footer clause was never a unique signal — its count is exactly `non_timeout_errors.len()`, and that vector being non-empty is the condition under which the warning renders. Split the two by what each reports rather than suppressing the duplicate: the footer counts timed-out tasks (a timeout leaves an empty cell and no message, so a count is its only home, and the warning filters timeouts out), while failures are named in the warning with git's full error text. `format_summary_message` drops its `error_count` parameter entirely. Also corrects a stale claim in the status_symbols module spec: the footer never listed which tasks timed out per item — it only ever carried counts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
worktrunk-bot
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3442. A failed task printed the same count twice on adjacent lines — the summary footer's
N tasks failedclause and the▲ N tasks failed:warning header directly below it that names each failure:The footer clause was never a distinct signal: its count is exactly
non_timeout_errors.len(), and that vector being non-empty is precisely the condition under which the warning renders. So the number was duplicated in 100% of cases.Rather than suppress the duplicate when a warning happens to follow, this splits the two by what each reports. The footer counts what's missing from the table — timed-out tasks, which leave an empty cell and have no message to print, so a count is the only signal they can carry (and the warning deliberately filters them out). Failures are named in the warning with git's full error text.
format_summary_messagedrops itserror_countparameter entirely; the footer now reads:Also corrects a stale claim in the
status_symbolsmodule spec: it said the footer "lists which tasks did not finish per item," giving a mapping from a·cell back to the timed-outTaskKind. No such mapping ever existed — the footer only carried counts, and budget-based truncation produces no diagnostic at all by design.One narrow behavior note: in progressive TTY mode the footer is stdout (a repainted table row) while the warning is stderr, so
wt list 2>/dev/nullon a TTY no longer shows a bare failure count. That case was already discarding the error detail, and discarding stderr discards narration by definition; the ordinary piped case (both on stderr) is unchanged.Testing
The
format_summary_messageunit test now covers the timeout-only footer variants; the two failure-warning integration snapshots are updated to show the deduplicated footer. Verified end-to-end against theindex.lockscenario (dirty worktree + pre-existing lock file).